3.7.44 \(\int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx\) [644]

3.7.44.1 Optimal result
3.7.44.2 Mathematica [C] (warning: unable to verify)
3.7.44.3 Rubi [A] (verified)
3.7.44.4 Maple [F]
3.7.44.5 Fricas [F]
3.7.44.6 Sympy [F]
3.7.44.7 Maxima [F]
3.7.44.8 Giac [F]
3.7.44.9 Mupad [F(-1)]

3.7.44.1 Optimal result

Integrand size = 23, antiderivative size = 227 \[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=-\frac {2 a b \operatorname {Hypergeometric2F1}\left (2,\frac {m}{2},\frac {2+m}{2},\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right ) (d \sec (e+f x))^m}{\left (a^2+b^2\right )^2 f m}+\frac {\operatorname {AppellF1}\left (\frac {1}{2},2,1-\frac {m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan (e+f x)}{a^2 f}+\frac {b^2 \operatorname {AppellF1}\left (\frac {3}{2},2,1-\frac {m}{2},\frac {5}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \sec (e+f x))^m \sec ^2(e+f x)^{-m/2} \tan ^3(e+f x)}{3 a^4 f} \]

output
-2*a*b*hypergeom([2, 1/2*m],[1+1/2*m],b^2*sec(f*x+e)^2/(a^2+b^2))*(d*sec(f 
*x+e))^m/(a^2+b^2)^2/f/m+AppellF1(1/2,2,1-1/2*m,3/2,b^2*tan(f*x+e)^2/a^2,- 
tan(f*x+e)^2)*(d*sec(f*x+e))^m*tan(f*x+e)/a^2/f/((sec(f*x+e)^2)^(1/2*m))+1 
/3*b^2*AppellF1(3/2,2,1-1/2*m,5/2,b^2*tan(f*x+e)^2/a^2,-tan(f*x+e)^2)*(d*s 
ec(f*x+e))^m*tan(f*x+e)^3/a^4/f/((sec(f*x+e)^2)^(1/2*m))
 
3.7.44.2 Mathematica [C] (warning: unable to verify)

Result contains complex when optimal does not.

Time = 18.79 (sec) , antiderivative size = 2453, normalized size of antiderivative = 10.81 \[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\text {Result too large to show} \]

input
Integrate[(d*Sec[e + f*x])^m/(a + b*Tan[e + f*x])^2,x]
 
output
((d*Sec[e + f*x])^m*((-2*a*b*(-1 + (Sec[e + f*x]^2)^(m/2)))/m + (a^2 - b^2 
)*Hypergeometric2F1[1/2, 1 - m/2, 3/2, -Tan[e + f*x]^2]*Tan[e + f*x] + (2* 
a*b*AppellF1[-m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a 
 + I*b)/(a + b*Tan[e + f*x])]*(Sec[e + f*x]^2)^(m/2))/(m*((b*(-I + Tan[e + 
 f*x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + 
 f*x]))^(m/2)) + (b*(a^2 + b^2)*AppellF1[1 - m, -1/2*m, -1/2*m, 2 - m, (a 
- I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*(Sec[e + f*x] 
^2)^(m/2))/((-1 + m)*((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)* 
((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)*(a + b*Tan[e + f*x]))) 
)/(f*(a + b*Tan[e + f*x])^2*((a^2 - b^2)*Hypergeometric2F1[1/2, 1 - m/2, 3 
/2, -Tan[e + f*x]^2]*Sec[e + f*x]^2 - 2*a*b*(Sec[e + f*x]^2)^(m/2)*Tan[e + 
 f*x] + (2*a*b*AppellF1[-m, -1/2*m, -1/2*m, 1 - m, (a - I*b)/(a + b*Tan[e 
+ f*x]), (a + I*b)/(a + b*Tan[e + f*x])]*(Sec[e + f*x]^2)^(m/2)*Tan[e + f* 
x])/(((b*(-I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + 
 f*x]))/(a + b*Tan[e + f*x]))^(m/2)) - (b^2*(a^2 + b^2)*AppellF1[1 - m, -1 
/2*m, -1/2*m, 2 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[ 
e + f*x])]*(Sec[e + f*x]^2)^(1 + m/2))/((-1 + m)*((b*(-I + Tan[e + f*x]))/ 
(a + b*Tan[e + f*x]))^(m/2)*((b*(I + Tan[e + f*x]))/(a + b*Tan[e + f*x]))^ 
(m/2)*(a + b*Tan[e + f*x])^2) + (b*(a^2 + b^2)*m*AppellF1[1 - m, -1/2*m, - 
1/2*m, 2 - m, (a - I*b)/(a + b*Tan[e + f*x]), (a + I*b)/(a + b*Tan[e + ...
 
3.7.44.3 Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 219, normalized size of antiderivative = 0.96, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 3994, 505, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2}dx\)

\(\Big \downarrow \) 3994

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \int \frac {\left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{(a+b \tan (e+f x))^2}d(b \tan (e+f x))}{b f}\)

\(\Big \downarrow \) 505

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \int \left (\frac {a^2 \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{\left (a^2-b^2 \tan ^2(e+f x)\right )^2}-\frac {2 a b \tan (e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{\left (a^2-b^2 \tan ^2(e+f x)\right )^2}+\frac {b^2 \tan ^2(e+f x) \left (\tan ^2(e+f x)+1\right )^{\frac {m-2}{2}}}{\left (b^2 \tan ^2(e+f x)-a^2\right )^2}\right )d(b \tan (e+f x))}{b f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\sec ^2(e+f x)^{-m/2} (d \sec (e+f x))^m \left (\frac {b \tan (e+f x) \operatorname {AppellF1}\left (\frac {1}{2},2,\frac {2-m}{2},\frac {3}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a^2}-\frac {2 a b^2 \left (\tan ^2(e+f x)+1\right )^{m/2} \operatorname {Hypergeometric2F1}\left (2,\frac {m}{2},\frac {m+2}{2},\frac {\tan ^2(e+f x) b^2+b^2}{a^2+b^2}\right )}{m \left (a^2+b^2\right )^2}+\frac {b^3 \tan ^3(e+f x) \operatorname {AppellF1}\left (\frac {3}{2},2,\frac {2-m}{2},\frac {5}{2},\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{3 a^4}\right )}{b f}\)

input
Int[(d*Sec[e + f*x])^m/(a + b*Tan[e + f*x])^2,x]
 
output
((d*Sec[e + f*x])^m*((b*AppellF1[1/2, 2, (2 - m)/2, 3/2, (b^2*Tan[e + f*x] 
^2)/a^2, -Tan[e + f*x]^2]*Tan[e + f*x])/a^2 + (b^3*AppellF1[3/2, 2, (2 - m 
)/2, 5/2, (b^2*Tan[e + f*x]^2)/a^2, -Tan[e + f*x]^2]*Tan[e + f*x]^3)/(3*a^ 
4) - (2*a*b^2*Hypergeometric2F1[2, m/2, (2 + m)/2, (b^2 + b^2*Tan[e + f*x] 
^2)/(a^2 + b^2)]*(1 + Tan[e + f*x]^2)^(m/2))/((a^2 + b^2)^2*m)))/(b*f*(Sec 
[e + f*x]^2)^(m/2))
 

3.7.44.3.1 Defintions of rubi rules used

rule 505
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Int[E 
xpandIntegrand[(a + b*x^2)^p, (c/(c^2 - d^2*x^2) - d*(x/(c^2 - d^2*x^2)))^( 
-n), x], x] /; FreeQ[{a, b, c, d, p}, x] && ILtQ[n, -1] && PosQ[a/b]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3994
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( 
x_)])^(n_), x_Symbol] :> Simp[d^(2*IntPart[m/2])*((d*Sec[e + f*x])^(2*FracP 
art[m/2])/(b*f*(Sec[e + f*x]^2)^FracPart[m/2]))   Subst[Int[(a + x)^n*(1 + 
x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, d, e, f, m, 
n}, x] && NeQ[a^2 + b^2, 0] &&  !IntegerQ[m] && IntegerQ[n]
 
3.7.44.4 Maple [F]

\[\int \frac {\left (d \sec \left (f x +e \right )\right )^{m}}{\left (a +b \tan \left (f x +e \right )\right )^{2}}d x\]

input
int((d*sec(f*x+e))^m/(a+b*tan(f*x+e))^2,x)
 
output
int((d*sec(f*x+e))^m/(a+b*tan(f*x+e))^2,x)
 
3.7.44.5 Fricas [F]

\[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="fricas")
 
output
integral((d*sec(f*x + e))^m/(b^2*tan(f*x + e)^2 + 2*a*b*tan(f*x + e) + a^2 
), x)
 
3.7.44.6 Sympy [F]

\[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\int \frac {\left (d \sec {\left (e + f x \right )}\right )^{m}}{\left (a + b \tan {\left (e + f x \right )}\right )^{2}}\, dx \]

input
integrate((d*sec(f*x+e))**m/(a+b*tan(f*x+e))**2,x)
 
output
Integral((d*sec(e + f*x))**m/(a + b*tan(e + f*x))**2, x)
 
3.7.44.7 Maxima [F]

\[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="maxima")
 
output
integrate((d*sec(f*x + e))^m/(b*tan(f*x + e) + a)^2, x)
 
3.7.44.8 Giac [F]

\[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\int { \frac {\left (d \sec \left (f x + e\right )\right )^{m}}{{\left (b \tan \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*sec(f*x+e))^m/(a+b*tan(f*x+e))^2,x, algorithm="giac")
 
output
integrate((d*sec(f*x + e))^m/(b*tan(f*x + e) + a)^2, x)
 
3.7.44.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d \sec (e+f x))^m}{(a+b \tan (e+f x))^2} \, dx=\int \frac {{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^m}{{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^2} \,d x \]

input
int((d/cos(e + f*x))^m/(a + b*tan(e + f*x))^2,x)
 
output
int((d/cos(e + f*x))^m/(a + b*tan(e + f*x))^2, x)